package 输出和输入;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class 字符流 {
    public static void main(String[] args) {
        System.out.println(System.getProperty("file.encoding"));
        FileReader reader=null;
        try {
            reader=new FileReader("F:/呵呵呵.txt");

            int lwn=0;
            char[]chars=new char[1024];
            while(reader.read(chars,0,10)!=-1){
                for (char c:chars){
                    System.out.print (c);
                }
                System.out.println();
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
